﻿<%@ Page Title="" Language="VB" MasterPageFile="~/KYC/MasterPagePopup.master" AutoEventWireup="false"
    CodeFile="Amlo1_01_Popup.aspx.vb" Inherits="AMLO_Amlo1_01_Popup" %>
<asp:Content ID="Content2" ContentPlaceHolderID="head" Runat="Server">
 
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <script type="text/javascript">
        var prm = Sys.WebForms.PageRequestManager.getInstance();

        prm.add_initializeRequest(InitializeRequest);
        prm.add_endRequest(EndRequest);

        function InitializeRequest(sender, args) {
            $get('ContentPlaceHolder1_UpdatePanel1').style.cursor = 'wait';
        }

        function EndRequest(sender, args) {
            $get('ContentPlaceHolder1_UpdatePanel1').style.cursor = 'auto';
        }

   </script>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table style="width: 100%;">
                <tr>
                    <td align="left" colspan="2">
                        <asp:Label ID="lblCbs" runat="server" Text="ธุรกรรมที่เกิดขึ้นจริง : " CssClass="control" Font-Bold="True" ForeColor="Black" />
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="top" colspan="2">
                       <asp:GridView ID="grdAmloCbs" runat="server" AutoGenerateColumns="False" CellPadding="4"
                            ForeColor="#333333" Style="margin-right: 0px; margin-bottom: 0px;" Width="100%"
                            AllowPaging="True">
                            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                            <Columns>
                                <asp:BoundField HeaderText="รหัสสาขา" DataField="branchcode" >
                                    <ItemStyle HorizontalAlign="Center" Width="80px" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="วันที่ทำธุรกรรม">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCbsTranDate" runat="server" Text='<%# eval("tran_Date",  "{0:dd/MM/yyyy}") %>' />
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="80px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="เลขที่บัญชี / ชื่อ" ItemStyle-Width="200px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCBS_FORACID" runat="server" Text='<%# eval("FORACID") %>'></asp:Label>
                                        <br />
                                        <asp:Label ID="lblCBS_ACCT_NAME" runat="server" Text='<%# eval("ACCT_NAME") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                                <asp:BoundField HeaderText="ชนิดธุรกรรม" DataField="amlo_tran_desc">
                                    <ItemStyle HorizontalAlign="Left" Width="250px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="TRAN_AMT" HeaderText="จำนวนเงิน" DataFormatString="{0:N2}">
                                    <ItemStyle HorizontalAlign="Center" Width="80px" />
                                </asp:BoundField>
                            </Columns>
                            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <PagerSettings Mode="NumericFirstLast" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" CssClass="cssPager" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <HeaderStyle BackColor="#FF9933" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="top" style="width: 100px">
                        <asp:HiddenField ID="hdfCbsSeq" runat="server" />
                        <asp:HiddenField ID="hdfSolId" runat="server" />
                        <asp:HiddenField ID="hdfTranDate" runat="server" />
                        <asp:HiddenField ID="hdfRptSeq" runat="server" />
                        <asp:Label ID="lblReportStatus" runat="server" CssClass="control">สถานะรายงาน</asp:Label>
                    </td>
                    <td align="left" valign="top" style="width: 282px">
                        <asp:RadioButtonList ID="rdoReportStatus" runat="server" CssClass="control" BackColor="#FFCCCC"
                            RepeatDirection="Horizontal" AutoPostBack="true">
                            <asp:ListItem Text="รายงาน" Value="Y" />
                            <asp:ListItem Text="ไม่รายงาน" Value="N" />
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="top">
                        <asp:Label ID="lblFullRptno" runat="server" CssClass="control">เลขที่รายงาน</asp:Label>
                    </td>
                    <td align="left" valign="top">
                        <asp:TextBox ID="txtFullRptno" runat="server" CssClass="control" ReadOnly="true" Enabled="False" />
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="top">
                        <asp:Label ID="lblReason" runat="server" CssClass="control">เหตุผล</asp:Label>
                    </td>
                    <td align="left" valign="top">
                        <asp:TextBox ID="txtReason" runat="server" CssClass="control" Width="400px" BackColor="#FFCCCC" />
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="top">
                    </td>
                    <td align="left" valign="top">
                        <asp:Button ID="btnSave" runat="server" Text="บันทึก" CssClass="control" Width="80px" />
                    </td>
                </tr>
                <tr>
                    <td align="left" colspan="2">
                        <asp:Label ID="lblBranch" runat="server" Text="ธุรกรรมที่สาขาบนทึก : " CssClass="control" Font-Bold="True" ForeColor="Black" Visible="false" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:GridView ID="grdAmlo" runat="server" AutoGenerateColumns="False" CellPadding="4"
                            ForeColor="#333333" Style="margin-right: 0px; margin-bottom: 0px;" Width="100%"
                            AllowPaging="True">
                            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                            <Columns>
                                <asp:CommandField ButtonType="Image" SelectImageUrl="~/img/icon/select_icon.gif"
                                    ShowSelectButton="True">
                                    <ItemStyle Width="60px" />
                                </asp:CommandField>
                                <asp:BoundField DataField="sol_id" HeaderText="SOL_ID">
                                    <ItemStyle HorizontalAlign="Center" Width="60px" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="VER/SEND">
                                    <ItemTemplate>
                                        <asp:Label ID="Label2" runat="server" Text='<%# eval("RPTREV") %>'></asp:Label>
                                        <asp:Label ID="Label7" runat="server" Text="/"></asp:Label>
                                        <asp:Label ID="Label8" runat="server" Text='<%# iif(eval("ISSEND") =0 ," ","Y") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="80px" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="RPTNO" HeaderText="เลขที่">
                                    <ItemStyle HorizontalAlign="Center" Width="80px" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="เลขที่บัญชี/ชื่อ">
                                    <ItemTemplate>
                                        <asp:Label ID="lblAccountNo" runat="server" Text='<%# Eval("accountno") %>' />
                                        <br />
                                        <asp:Label ID="Label1" runat="server" Text='<%# eval("FirstName") & " " & eval("LastName") %>'></asp:Label>
                                        <asp:HiddenField ID="hdfRptSeq" runat="server" Value='<%# eval("rptseq") %>' />
                                        <asp:HiddenField ID="hdfRptFullNo" runat="server" Value='<%# eval("sol_id") & "-" & eval("rptyear") & "-" & eval("rptno") %>' />
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" Width="150px" />
                                </asp:TemplateField>
                                <asp:BoundField HeaderText="วันที่ทำธุรกรรม" DataField="transDate" DataFormatString="{0:d}">
                                    <ItemStyle HorizontalAlign="Center" Width="80px" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="ชนิดธุรกรรม">
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# iif(eval("TYPE_TSC_ID") ="-","",iif(eval("TYPE_TSC_ID") ="99",eval("TRANSTYPEOTHER"),eval("TYPE_TSC_NAME"))) %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" Width="130px" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="TRANSAMT" HeaderText="จำนวนเงิน" DataFormatString="{0:N2}">
                                    <ItemStyle HorizontalAlign="Center" Width="100px" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="ผู้บันทึก">
                                    <ItemTemplate>
                                        <asp:Label ID="Label5" runat="server" Text='<%# eval("BranchCode") & "  " & eval("UpdateBy") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="80px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="ลบ/อนุมัติ">
                                    <ItemTemplate>
                                        <asp:Label ID="Label9" runat="server" Text=" "></asp:Label>
                                        <asp:Label ID="Label10" runat="server" Text=" "></asp:Label>
                                        <asp:Label ID="Label11" runat="server" Text='<%# iif(eval("isDelete") =0," ","Y") %>'></asp:Label>
                                        <asp:Label ID="Label6" runat="server" Text="/"></asp:Label>
                                        <asp:Label ID="Label12" runat="server" Text='<%# iif(eval("isConfirm") =0," ","Y") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="90px" />
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <PagerSettings Mode="NumericFirstLast" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" CssClass="cssPager" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <HeaderStyle BackColor="#FF9933" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>
                    </td>
                </tr>
            </table>
            <div align="right">
                <asp:Label ID="lblTotal" runat="server" Font-Bold="True" ForeColor="#003300"></asp:Label>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>
